﻿@model IEnumerable<OES.Models.Course>
@{
    ViewBag.Title = "Index";
}

<h2>Dersler</h2>

<p>
    @Html.ActionLink("Yeni Ders Oluştur", "Create")
</p>
<table class="table table-striped table-bordered">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.UserProfile.UserName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Name)
        </th>
        <th>@Html.DisplayNameFor(model=>model.CreateDate)</th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
  
        <td>
            @Html.DisplayFor(modelItem => item.UserProfile.UserName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Name)
        </td>
        <td>@Html.DisplayFor(modelItem=>item.CreateDate)</td>
        <td>
            @Html.ActionLink("Güncelle", "Edit", new { id=item.CourseID }) |
            @Html.ActionLink("Detaylar", "Details", new { id=item.CourseID }) |
            @Html.ActionLink("Sil", "Delete", new { id=item.CourseID })
          
        </td>
    </tr>
}

</table>
